Skip to content

fix(reconciler): bound the Flight EOF wait by the render deadline (#204 follow-up) - #214

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/pr204-followup
Sep 1, 2026
Merged

fix(reconciler): bound the Flight EOF wait by the render deadline (#204 follow-up)#214
ScriptedAlchemy merged 1 commit into
mainfrom
fix/pr204-followup

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Addresses the unresolved P1 Codex finding on #204 (reconciler.ts:368): when the decoded root had no pending boundaries but the Flight source stayed open, the unconditional Deferred.await(flightDone) bypassed maxElapsedMs, so a stalled transport hung stream() and dispatch() forever.

The EOF wait is now raced against the render deadline via the same helper the pending-boundary path uses (waitOrDeadline, generalized from waitPendingOrDeadline), failing with elapsed-time-exceeded and tearing down the Flight source (reader cancel) on timeout. Unbounded behavior with no configured budget is unchanged and identical to the pending path.

Tests

  • bounds Flight EOF for stream and dispatch and cancels the source — never-closing Flight source + maxElapsedMs: 150, asserts elapsed-time-exceeded within budget and exactly one cancel() for both stream and dispatch.

Gates: scoped rstest, pnpm typecheck, pnpm lint — all green.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bde9ee8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@agent-bundle/runtime Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T21:34:11.829538Z bde9ee8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy merged commit 4daf388 into main Sep 1, 2026
9 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/pr204-followup branch September 3, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant